Repository navigation
Conversation
56fa99a to
e33fdba
Compare
Test Results 54 files ± 0 54 suites ±0 37m 30s ⏱️ -53s Results for commit 715af39. ± Comparison against base commit a170752. This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
e33fdba to
1ebdd3e
Compare
1ebdd3e to
e5b5658
Compare
e5b5658 to
bf72787
Compare
There was a problem hiding this comment.
🟡 Changes recommended
When history is full and a footer is present, footer scrolling discards the upward-scroll notification, causing selections to be cleared even though the selected text survives.
1 open issue
What changed in this PR
This PR updates the terminal emulator to preserve scroll-back history for top-anchored scroll regions, addressing the missing backward scrolling reported in #2680.
Changes:
- Retains displaced top lines in history while keeping footer lines fixed.
- Updates the characterization test from #2701 and adds coverage for full history and whole-screen regions.
| File | Description |
|---|---|
| terminal/tests/org.eclipse.terminal.test/src/org/eclipse/terminal/internal/emulator/VT100EmulatorBackendTest.java | Verifies history retention, capacity limits, footer stability, and cursor position. |
| terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/emulator/VT100EmulatorBackend.java | Routes top-anchored newline scrolling into history and restores footer positioning. |
Review effort: Balanced
|
My test which this PR fixes: |
bf72787 to
9c5d82b
Compare
This statement is hard for me to read, but I think this desribes a positive result of testing the PR. Planning to merge tomorrow, please clarify in case my understanding of the above it not correct. |
Full-screen CLIs such as Codex in --no-alt-screen mode, or Vim kept off the alternate screen, scroll through a DECSTBM region anchored at the top of the screen. The emulator scrolled such a region in place and dropped the displaced top line, so no scroll-back history was created. Like xterm and VTE, a newline at the bottom of such a region now moves the top line into the history while the lines below the region stay in place. With a full history the scroll reaches snapshots as one upward shift, so selections move with the text, and a full TerminalTextDataFastScroll rotates its ring buffer and copies back only the fixed lines instead of the whole history. Regions with a lower top margin still scroll in place. Fixes the missing scroll-back of eclipse-platform#2680 Assisted-by: multiple AI agents and layers of automated tooling 🤖
9c5d82b to
715af39
Compare
Yes, I have given an exact problem I figured while reviewing another PR that combined with this PR is actually fixed. I haven't reviewed this one in more details. |


Full-screen CLIs such as Codex in --no-alt-screen mode render through DECSTBM scroll regions anchored at the top of the screen and scroll by emitting newlines at the region bottom. The emulator scrolled such a region in place and discarded the displaced top line, so no scroll-back history was created and the output could not be scrolled backwards.
Like xterm and VTE, a newline at the bottom of a scroll region whose top margin is the top of the screen now moves the displaced top line into the scroll-back history, while the lines below the region keep their position on the screen. Regions with a lower top margin still scroll in place, guarded by the characterization tests from #2701; the test documenting the old top-anchored behavior is flipped to assert the history is created.
This addresses the missing backward scrolling reported in #2680.